#include <iostream>
using namespace std;

int arr[100005];
void quick_sort(int* arr, int left, int right)
{
    if (left >= right) return;

    int mid = (left + right) / 2;
    int key = arr[mid];

    int l = left - 1, r = right + 1;
    while (l < r)
    {
        do ++l; while (arr[l] < key);
        do --r; while (arr[r] > key);
        if (l < r) swap(arr[l], arr[r]);
    }
    quick_sort(arr, left, r);
    quick_sort(arr, r + 1, right);
}

int main()
{
    int n; cin >> n;
    for (int i = 0; i < n; ++i) cin >> arr[i];
    quick_sort(arr, 0, n - 1);
    for (int i = 0; i < n; ++i) cout << arr[i] << ' ';
    return 0;
}